package PTA;
class Department {
    private String sector;
    private String name;
    private int num;
    private String work;
    public Department(String sector, String name, int num, String work) {
        this.sector = sector;
        this.name = name;
        this.num = num;
        this.work = work;
    }
    public String printIntro() {
        return "部门名称："+sector+"\n"
                +"经理："+name+"\n"
                +"员工人数："+num+"\n"
                +"部门职责："+work+"\n";
    }
}

class HR extends Department {
    private int plan;
    public HR(String sector, String name, int num, String work, int plan) {
        super(sector, name, num, work);
        this.plan = plan;
    }

    @Override
    public String printIntro() {
        return super.printIntro()+"招聘目标："+plan+"人";
    }
}
class RD extends Department {
    private int number;

    public RD(String sector, String name, int num, String work, int number) {
        super(sector, name, num, work);
        this.number = number;
    }

    @Override
    public String printIntro() {
        return super.printIntro()+"研发项目数:"+number+"人";
    }
}
public class t13 {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        HR hr=new HR("人力资源部","张红",5,"负责公司的人才招聘和培训。",15);
        RD rd=new RD("研发部","李响",50,"负责公司产品研发",4);
        System.out.println(hr.printIntro());
        System.out.println(rd.printIntro());
    }
}
